﻿using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.DirectoryServices;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ARS.Control.Attributes;
using ARS.Control.Custom.Entity.Widget;
using ARS.Control.Custom.SelectLinkage.Attributes;
using ARS.Control.Interface;

namespace NetWebControl
{
    class DbSelectSLFund : DbSelectSL
    {
        public DbSelectSLFund()
        {
            this.DataTextField = "FundName";
            this.DataValueField = "FundInfo_Id";
            this.ParentNameField = "ParentId";
            this.TableName = "fundinfo";
            this.KeyField = "FundInfo_Id";
            this.Css = "select selmargin";
        }
    }
    internal class Model
    {
        public void Select(Model model)
        {
            DataContext conn =
                new DataContext(
                    @"server=HAPPY-PC;User ID=sa;Password=happy;database=XinShiDai4.13;Connection Reset=FALSE;Max Pool Size = 512;");
        }
    }

   
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.SelectLinkage1.DbSelectSLListItem = new DbSelectSL[]
                {
                    new DbSelectSLFund() {StrWhere = "ParentId=0"},
                    new DbSelectSLFund() {},
                };
            }
        }

        protected override void OnPreRender(EventArgs e)
        {
            this.Page.ClientScript.RegisterClientScriptResource(this.GetType(), ARS.Control.Attributes.ResourcePath.EasyDialog.js);
            base.OnPreRender(e);
            //this.Page.ClientScript.RegisterClientScriptResource(this.GetType(), ARS.Control.Attributes.ResourcePath.EasyDialog.js);
        }

        protected override void OnPreLoad(EventArgs e)
        {

            
            base.OnPreLoad(e);
        }

        protected void DropDownListMultilevel1_SelectedIndexChanged(object sender, EventArgs e)
        {
          //  Response.Write(this.DropDownListMultilevel1.SelectedValue);
        }
    }
}